home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" omit-xml-declaration="yes"/>
- <xsl:variable name="common-styles">
- <style type="text/css">
- html{border: 4px solid gray; }
- body.twopanel{margin: 6px;padding:0px;font-family: sans-serif;overflow: auto;}
- table.column{background-color:#B6BDD2;border:1px #000088 solid;width:100%;font-size:140%;}
- div.columntitle{font-weight: bold; margin: 4px 2px 2px 2px; }
- div.itemtitle{font-weight: bold; margin: 4px 2px 2px 2px;}
- div.contents{ padding: 22px 22px 22px 22px; text-align: justify;font-size:140%;}
- div.itemcomments{font-size: small;border-top: 1px dotted silver; margin-top: 14px}
- a:link {color: #1a20a1;text-decoration: none;}
- a:hover {color: #00a100;text-decoration: none;}
- </style>
- </xsl:variable>
-
-
- <xsl:template match="//record">
- <html>
- <head>
- <title>News Item</title>
- <xsl:copy-of select="$common-styles"/>
- </head>
- <body>
- <table class="column">
- <tr>
- <td>
- <div class="columntitle" align="top">
- <a href="{feed/link}"><xsl:value-of select="feed/title" disable-output-escaping="yes"/></a><br/>
- </div>
- <div class="itemtitle" align="top">
- <a href="{item/link}"><xsl:value-of select="item/title" disable-output-escaping="yes"/></a>
- </div>
- </td>
- <xsl:if test="feed/image">
- <td align="right">
- <xsl:variable name="imgsrc" select="feed/image"/>
- <img src="{$imgsrc}"/>
- </td>
- </xsl:if>
- </tr>
- </table>
-
- <div class="contents">
- <xsl:value-of select="item/content" disable-output-escaping="yes"/>
- </div>
- <div class="footer"><xsl:value-of select="item/published" disable-output-escaping="yes"/></div>
-
-
- <div class="footer">
- <xsl:if test="item/comments">
- <xsl:variable name="commentlink" select="item/comments/@link"/>
- <a href="{$commentlink}"><xsl:value-of select="item/comments/@text"/></a>
- </xsl:if>
- <xsl:if test="item/reply">
- <xsl:variable name="replylink" select="item/reply/@link"/>
- <xsl:text> </xsl:text><a href="{$replylink}"><xsl:value-of select="item/reply/@text"/></a>
- </xsl:if>
- </div>
- </body>
- </html>
- </xsl:template>
-
- </xsl:stylesheet>